<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "me_grade".
 *
 * @property integer $id
 * @property string $name
 * @property double $advance_payment
 * @property double $upgrade_price
 * @property integer $created_at
 * @property integer $updated_at
 */
class Grade extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'me_grade';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['name'], 'required'],
            [['advance_payment', 'upgrade_price'], 'number'],
            [['created_at', 'updated_at'], 'integer'],
            [['name'], 'string', 'max' => 100],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => '级别名称',
            'advance_payment' => '需要充值预付款金额',
            'upgrade_price' => '购买升级价格',
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }
}
